using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Collections.Generic;
using DiplomaCLR;


public partial class StoredProcedures
{
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void wp_ScriptDB(SqlString DBName, SqlString Branch, SqlString Tag, SqlInt32 State, SqlDateTime Date)
    {
        
    }

    private static List<int> GetStates(string db, string name, ParamType type)
    {
        List<int> states = new List<int>();
        if (type == ParamType.Branch)
        {
            states = SQLmethods.GetBranchStates(db, name);
        }
        else
        {
        }
        return states;
    }

    //private static List<int> GetStates(string db, DateTime date)
    //{
    //}

    //private static List<int> GetStates(string db, int state)
    //{
    //}

    private static string GetScript(int state)
    {
        return SQLmethods.GetScript(state);
    }

    private enum ParamType
    {
        Branch = 1,
        Tag = 2
    }
};
